package org.sdfc.model.dfc

import com.documentum.fc.client.IDfTypedObject
import com.documentum.fc.common.IDfId
import com.documentum.fc.common.IDfTime

import org.sdfc.model.attr._

/** DfcMutableTypedObject implementation which adapts an IDfTypedObject
 *  into an DfcMutableTypedObject.
 */
class DfcMutableTypedObjectAdaptor (
  /** Underlying IDfTypedObject. */
  protected val underlying : IDfTypedObject
)
extends DfcTypedObjectAdaptor with DfcMutableTypedObject {
  
  /** Sets the value of a SingleBooleanAttribute. */
  def setBoolean(attr : SingleBooleanAttribute, value : Boolean) : Unit =
    underlying.setBoolean(attr.name, value)
  
  /** Sets the value of a SingleIntAttribute. */
  def setInt(attr : SingleIntAttribute, value : Int) : Unit =
    underlying.setInt(attr.name, value)
  
  /** Sets the value of a SingleStringAttribute. */
  def setString(attr : SingleStringAttribute, value : String) : Unit =
    underlying.setString(attr.name, value)
  
  /** Sets the value of a SingleIdAttribute. */
  def setId(attr : SingleIdAttribute, value : IDfId) : Unit =
    underlying.setId(attr.name, value)
  
  /** Sets the value of a SingleTimeAttribute. */
  def setTime(attr : SingleTimeAttribute, value : IDfTime) : Unit =
    underlying.setTime(attr.name, value)
  
  /** Sets the value of a SingleDoubleAttribute. */
  def setDouble(attr : SingleDoubleAttribute, value : Double) : Unit =
    underlying.setDouble(attr.name, value)
  
  
  /** Sets the value of a RepeatingBooleanAttribute at a given index. */
  def setRepeatingBoolean(attr : RepeatingBooleanAttribute, index : Int, value : Boolean) : Unit =
    underlying.setRepeatingBoolean(attr.name, index, value)
  
  /** Sets the value of a RepeatingIntAttribute at a given index. */
  def setRepeatingInt(attr : RepeatingIntAttribute, index : Int, value : Int) : Unit =
    underlying.setRepeatingInt(attr.name, index, value)
  
  /** Sets the value of a RepeatingStringAttribute at a given index. */
  def setRepeatingString(attr : RepeatingStringAttribute, index : Int, value : String) : Unit =
    underlying.setRepeatingString(attr.name, index, value)
  
  /** Sets the value of a RepeatingIdAttribute at a given index. */
  def setRepeatingId(attr : RepeatingIdAttribute, index : Int, value : IDfId) : Unit =
    underlying.setRepeatingId(attr.name, index, value)
  
  /** Sets the value of a RepeatingTimeAttribute at a given index. */
  def setRepeatingTime(attr : RepeatingTimeAttribute, index : Int, value : IDfTime) : Unit =
    underlying.setRepeatingTime(attr.name, index, value)
  
  /** Sets the value of a RepeatingDoubleAttribute at a given index. */
  def setRepeatingDouble(attr : RepeatingDoubleAttribute, index : Int, value : Double) : Unit =
    underlying.setRepeatingDouble(attr.name, index, value)
  
  
  /** Inserts a value for a RepeatingBooleanAttribute at a given index. */
  def insertBoolean(attr : RepeatingBooleanAttribute, index : Int, value : Boolean) : Unit =
    underlying.insertBoolean(attr.name, index, value)
  
  /** Inserts a value for a RepeatingIntAttribute at a given index. */
  def insertInt(attr : RepeatingIntAttribute, index : Int, value : Int) : Unit =
    underlying.insertInt(attr.name, index, value)
  
  /** Inserts a value for a RepeatingStringAttribute at a given index. */
  def insertString(attr : RepeatingStringAttribute, index : Int, value : String) : Unit =
    underlying.insertString(attr.name, index, value)
  
  /** Inserts a value for a RepeatingIdAttribute at a given index. */
  def insertId(attr : RepeatingIdAttribute, index : Int, value : IDfId) : Unit =
    underlying.insertId(attr.name, index, value)
  
  /** Inserts a value for a RepeatingTimeAttribute at a given index. */
  def insertTime(attr : RepeatingTimeAttribute, index : Int, value : IDfTime) : Unit =
    underlying.insertTime(attr.name, index, value)
  
  /** Inserts a value for a RepeatingDoubleAttribute at a given index. */
  def insertDouble(attr : RepeatingDoubleAttribute, index : Int, value : Double) : Unit =
    underlying.insertDouble(attr.name, index, value)
  
  
  /** Appends a value for a RepeatingBooleanAttribute at end of list. */
  def appendBoolean(attr : RepeatingBooleanAttribute, value : Boolean) : Unit =
    underlying.appendBoolean(attr.name, value)
  
  /** Appends a value for a RepeatingIntAttribute at end of list. */
  def appendInt(attr : RepeatingIntAttribute, value : Int) : Unit =
    underlying.appendInt(attr.name, value)
  
  /** Appends a value for a RepeatingStringAttribute at end of list. */
  def appendString(attr : RepeatingStringAttribute, value : String) : Unit =
    underlying.appendString(attr.name, value)
  
  /** Appends a value for a RepeatingIdAttribute at end of list. */
  def appendId(attr : RepeatingIdAttribute, value : IDfId) : Unit =
    underlying.appendId(attr.name, value)
  
  /** Appends a value for a RepeatingTimeAttribute at end of list. */
  def appendTime(attr : RepeatingTimeAttribute, value : IDfTime) : Unit =
    underlying.appendTime(attr.name, value)
  
  /** Appends a value for a RepeatingDoubleAttribute at end of list. */
  def appendDouble(attr : RepeatingDoubleAttribute, value : Double) : Unit =
    underlying.appendDouble(attr.name, value)
  
  
  /** Removes value of a RepeatingAttribute at a given index. */
  def remove(attr : RepeatingAttribute[Any], index : Int) : Unit =
    underlying.remove(attr.name, index)
  
  /** Removes all values of a RepeatingAttribute. */
  def removeAll(attr : RepeatingAttribute[Any]) : Unit =
	underlying.removeAll(attr.name)
  
  /** Truncates the values of a RepeatingAttribute at a given index. */
  def truncate(attr : RepeatingAttribute[Any], index : Int) : Unit =
    underlying.truncate(attr.name, index)
  
}